package com.md.api.dao;

import com.md.api.entity.ReceivingAddrInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface ReceivingAddrInfoMapper {
    int deleteById(String receivingAddrId);

    int insert(ReceivingAddrInfo record);

    ReceivingAddrInfo getByReceivingAddrId(@Param("receivingAddrId") String receivingAddrId);

    List<ReceivingAddrInfo> selectAll();

    int updateById(ReceivingAddrInfo record);

    List<ReceivingAddrInfo> myAddr(String userId);

    void setDefault(@Param("userId") String userId,@Param("receivingAddrId") String receivingAddrId);

    ReceivingAddrInfo myDefaltAddr(@Param("userId")String userId);
}